﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;

namespace Model
{
    [Serializable]
    public partial class Tic3a01
    {
		private string _plistid;
		private string _orderid;
		private string _listid;
		
        /// <summary>
        /// 概要表主键
        /// </summary>
		public string Plistid
		{
			get { return _plistid;	 }
			set { _plistid=value;	}
		}
        /// <summary>
        /// 订单号
        /// </summary>
		public string Orderid
		{
			get { return _orderid;	 }
			set { _orderid=value;	}
		}
        /// <summary>
        /// 主键标识
        /// </summary>
		public string Listid
		{
			get { return _listid;	 }
			set { _listid=value;	}
		}
		
		public static List<Tic3a01> GetTic3a01ListByDataTable(DataTable dt)
		{
			if(dt == null) return null;
		    List<Tic3a01> list = new List<Tic3a01>();
		   
			foreach(DataRow dr in dt.Rows)
            {
				Tic3a01 model = GetTic3a01ByDataRow(dr);
				if(null == model) continue;
				
				list.Add(model);
            }
           return list;
		}
		
		public static Tic3a01 GetTic3a01ByDataRow(DataRow dr)
		{
			Tic3a01 model = new Tic3a01(); //实例化Tic3a01
	
			DataColumnCollection dcc = dr.Table.Columns;

			if (dcc.Contains("plistid")&&!(dr["plistid"] is System.DBNull))  
				model.Plistid = ( string)dr["plistid"];
			if (dcc.Contains("orderid")&&!(dr["orderid"] is System.DBNull))  
				model.Orderid = ( string)dr["orderid"];
			if (dcc.Contains("listid")&&!(dr["listid"] is System.DBNull))  
				model.Listid = ( string)dr["listid"];
			
			return model;
		}
    }
}
